If you have a VPN that hooks to WinSock, this may cause issues with WSL2, as noted in [this extremely helpful blog post.](When starting WSL2, you get βThe attempted operation is not supported for the type of object referenced.β β A nice guy's view on life (sprig.gs))
To resolve this, create a text file wsl.reg (the name is not important) with the following contents.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\0408F7A3]
"AppFullPath"="C:\\Windows\\System32\\wsl.exe"
"PermittedLspCategories"=dword:80000000
Double click on the file.
This should resolve the issue!